//
//  OKMovieViewController.m
//  ZLFastDoctor
//
//  Created by answer on 16/5/27.
//  Copyright © 2016年 LS. All rights reserved.
//

#import "OKMovieViewController.h"
#import <AVFoundation/AVFoundation.h>

@interface OKMovieViewController ()
@property (strong, nonatomic) AVPlayer *player;
@end

@implementation OKMovieViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    AVPlayer *player = [[AVPlayer alloc] initWithURL:[NSURL URLWithString:@"http://hls.quanmin.tv/live/35743/playlist.m3u8"]];
//    self.player = player;
    AVPlayerLayer *layer = [[AVPlayerLayer alloc] init];
    layer.frame = self.view.bounds;
    layer.player = player;
    [self.view.layer addSublayer:layer];
    [player play];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
